package test1223;

public class Test10 {
    public static void main(String[] args) {
        // 判断一个数是否是质数、质数打印true、不是打印false
        int a = 16;
        boolean b = true;
        for (int i = 2;i < a; i++){
            if (a % i == 0) {
                b = false;
                break;
            }
        }
        System.out.println("是否为质数"+b);
    }
}


